package com.bdqn.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.bdqn.entity.Sign;

import com.bdqn.mapper.SignMapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Controller 
@RequestMapping("/sys/sign")
public class SignController {
	

	
	@Autowired
	private SignMapper signMapper;
	
	@RequestMapping("/signlist")
	public String findAllModule(HttpSession session,@RequestParam(value = "pageno", defaultValue = "1") int pageNo) {
		PageHelper.startPage(pageNo, 5);
		List<Sign> listRole =signMapper.getAllSign();
		PageInfo<Sign> pageInfo = new PageInfo<>(listRole);
		session.setAttribute("pageInfo", pageInfo);
		return "redirect:/jsp/sys/sign/signlist.jsp";
		
	
	}
	

}